package com.topisv.tms.repository.pickCar;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.topisv.tms.entity.pickCar.PickCarStock;

/**
 * 拣货车位_DAO
 * @author ch
 *
 */
public abstract interface PickCarStockDao extends PagingAndSortingRepository<PickCarStock, Long>, JpaSpecificationExecutor<PickCarStock>
{

	@Query("select t from PickCarStock t where t.car.id=?")
	List<PickCarStock> loadStockByCarId(Long carId);

	@Query("select t from PickCarStock t where  t.car.id=?1 and t.stockCode=?2")
	PickCarStock loadStockByCondition(Long CarId, String stockCode);

}